home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / graphics / pbm / pbm_man.zoo / man5 / ppm.5 < prev   
Text File  |  1994-08-27  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4. ppm(5)                    FILE FORMATS                     ppm(5)
  5.  
  6.  
  7.  
  8. NAME
  9.      ppm - portable pixmap file format
  10.  
  11. DESCRIPTION
  12.      The portable pixmap format is a  lowest  common  denominator
  13.      color image file format.  The definition is as follows:
  14.  
  15.      - A "magic number" for identifying the  file  type.   A  ppm
  16.        file's magic number is the two characters "P3".
  17.  
  18.      - Whitespace (blanks, TABs, CRs, LFs).
  19.  
  20.      - A width, formatted as ASCII characters in decimal.
  21.  
  22.      - Whitespace.
  23.  
  24.      - A height, again in ASCII decimal.
  25.  
  26.      - Whitespace.
  27.  
  28.      - The maximum color-component value, again in ASCII decimal.
  29.  
  30.      - Whitespace.
  31.  
  32.      - Width * height pixels, each  three  ASCII  decimal  values
  33.        between 0 and the specified maximum value, starting at the
  34.        top-left corner of the pixmap, proceding in normal English
  35.        reading  order.  The three values for each pixel represent
  36.        red, green, and blue, respectively; a  value  of  0  means
  37.        that  color is off, and the maximum value means that color
  38.        is maxxed out.
  39.  
  40.      - Characters from a "#" to the next end-of-line are  ignored
  41.        (comments).
  42.  
  43.      - No line should be longer than 70 characters.
  44.  
  45.      Here is an example of a small pixmap in this format:
  46.      P3
  47.      # feep.ppm
  48.      4 4
  49.      15
  50.       0  0  0    0  0  0    0  0  0   15  0 15
  51.       0  0  0    0 15  7    0  0  0    0  0  0
  52.       0  0  0    0  0  0    0 15  7    0  0  0
  53.      15  0 15    0  0  0    0  0  0    0  0  0
  54.  
  55.      Programs that read this format should be as lenient as  pos-
  56.      sible, accepting anything that looks remotely like a pixmap.
  57.  
  58.      There is also a variant on the format, available by  setting
  59.      the  RAWBITS  option  at  compile  time.   This  variant  is
  60.  
  61.  
  62.  
  63. Sun Release 4.0  Last change: 15 September 1990                 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ppm(5)                    FILE FORMATS                     ppm(5)
  71.  
  72.  
  73.  
  74.      different in the following ways:
  75.  
  76.      - The "magic number" is "P6" instead of "P3".
  77.  
  78.      - The pixel values are stored as  plain  bytes,  instead  of
  79.        ASCII decimal.
  80.  
  81.      - Whitespace is not allowed in the pixels area, and  only  a
  82.        single  character  of  whitespace (typically a newline) is
  83.        allowed after the maxval.
  84.  
  85.      - The files are smaller and many times faster  to  read  and
  86.        write.
  87.  
  88.      Note that this raw format can only be used for maxvals  less
  89.      than or equal to 255.  If you use the _✓p_✓p_✓m library and try to
  90.      write a file with a larger  maxval,  it  will  automatically
  91.      fall back on the slower but more general plain format.
  92.  
  93. SEE ALSO
  94.      giftoppm(1),   gouldtoppm(1),   ilbmtoppm(1),   imgtoppm(1),
  95.      mtvtoppm(1),  pcxtoppm(1),  pgmtoppm(1),  pi1toppm(1), pict-
  96.      toppm(1),    qrttoppm(1),     rawtoppm(1),     rgb3toppm(1),
  97.      spctoppm(1),    sputoppm(1),    tgatoppm(1),    ximtoppm(1),
  98.      xpmtoppm(1),   ppmtogif(1),    ppmtoicr(1),    ppmtoilbm(1),
  99.      ppmtopcx(1),    ppmtopgm(1),    ppmtopi1(1),   ppmtopict(1),
  100.      ppmtops(1),   ppmtopuzz(1),    ppmtorgb3(1),    ppmtouil(1),
  101.      ppmtoxpm(1), ppmhist(1), ppmmake(1), ppmpat(1), ppmquant(1),
  102.      ppmquantall(1), ppmrelief(1), pnm(5), pgm(5), pbm(5)
  103.  
  104. AUTHOR
  105.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sun Release 4.0  Last change: 15 September 1990                 2
  130.  
  131.  
  132.  
  133.